<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        td {
            width: 150px;
        }

        tr {
            height: 40px;
        }
    </style>
</head>

<body>
<table style="width: 1200px;height: auto;text-align: center" align="center" border="1px" cellpadding="0px" cellspacing="0px" >
    <tr>
        <td>id</td>
        <td>姓名</td>
        <td>密码</td>
        <td>确认密码</td>
        <td>性别</td>
        <td>手机号</td>
        <td width="200px">兴趣爱好</td>
        <td>家乡</td>
        <td>个人介绍</td>
        <td>创建时间</td>
        <td>更新时间</td>
        <td>操作</td>
    </tr>
<?php
$server = "localhost";
$user = "root";
$pwd = "root";
$database = "maxik";
$ulinix = mysqli_connect($server, $user, $pwd, $database);
if ($ulinix) {
    $query = "select* from maxik";

    $ok = mysqli_query($ulinix,$query);
    if (mysqli_num_rows($ok)>0) {
       while ($row=mysqli_fetch_assoc($ok)){
            echo "<tr>";
            echo "<td>".$row['id']."</td>";
            echo "<td>".$row['name']."</td>";
            echo "<td>".$row['password1']."</td>";
            echo "<td>".$row['password1']."</td>";
            echo "<td>".$row['sex']."</td>";
            echo "<td>".$row['tel']."</td>";
            echo "<td>".$row['hobby']."</td>";
            echo "<td>".$row['selfintroduction']."</td>";
            echo "<td>".$row['hometown']."</td>";
            echo "<td>".$row['created_at']."</td>";
            echo "<td>".$row['updated_at']."</td>";
            echo "<td>
                      <a style='background-color: red' href='delete.php'>删除</a>
                      <a style='background-color: #4070a0' href='update.php'>更新</a></td>";
            echo " </tr>";
        }
    }
}
?>

<!--           <div style="display: inline-block;width: 50px;height:30px;line-height: 170%;background-color: #800b26"><a style="text-decoration: none;color: white" href="delete.php">删除</a></div>-->
<!--           <div style="display: inline-block;width: 50px;height:30px;line-height: 170%;background-color: green">  <a style="text-decoration: none;color: white" href="update.php">更新</a></div>-->
<!--        </td>-->
<!--    </tr>-->
<!--</table>-->
<!--</body>-->
</html>